<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    *{
        margin:0;
        padding: 0;
        font-family: consolas;
    }
    body{
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        background: #1c234a;
    }
    ul{
        position:relative;
    }
    ul li{
        list-style: none;
        margin:0 20px;
        font-size: 4em;
    }
    ul li span{
        position:relative;
        top:-2px;
        left:-10px;
        color:transparent;
    }
    ul li:hover span{
        color:#ef0448;
    }
    ul li a{
        position:relative;
        color:rgba(255, 255, 255, 0.1);
        text-decoration: none;
        font-weight: 700;
    }
    ul li a::before{
        content: attr(data-text);
        position:absolute;
        top:0;
        overflow-y:hidden;
        color: #1bfaad;
        white-space: nowrap;
        overflow: hidden;
    }
    ul:hover li a:before{
        animation: animate 0.5s steps(11) forwards;
    }
    @keyframes animate{
        0%{
            width: 387.063px;
        }
        100%{
            width:0px;
        }
    }

    ul li:hover a:before{
        animation: animateTwo 2s steps(11) forwards;
    }
    @keyframes animateTwo{
        0%{
            width: 0px;
        }
        100%{
            width: 387.063px;
        }
    }
</style>
<body>
    <div>
        <ul>
            <li><span>&times;</span><a href="#" data-text="Home">Home</a></li>
            <li><span>&times;</span><a href="#" data-text="Home">Home</a></li>
            <li><span>&times;</span><a href="#" data-text="Home">Home</a></li>
            <li><span>&times;</span><a href="#" data-text="Typing Menu">Typing Menu</a></li>
        </ul>
    </div>
    
</body>
</html>